<script>on wsFindHitglobal findMe, searchHits, numHit, ifFind, hitPath, windowName, allFound, lastFindMeglobal searchMe, howFarDown, aFoundLine, startChar, startSelect, endSelectget i2_Text of window "Find"if it ≠ findMe thenput Scrunch(i2_Text of window "Find") into findMeput 1 into startCharput empty into aFoundLineput empty into searchHitsput 0 into numHitget "i3_Name:Find" & return & "i7_Text:0" & return & "i8_Text:" & return & "i9_Text:"set properties of window "Find" to itset i0_Height of window "Find" to "288"elseset i0_Height of window "Find" to "288"end ifif findMe ≠ empty thenput TRUE into ifFindarisFind findMe -- compiles data to be searchedif findMe ≠ lastFindMe thenput FALSE into allFoundend ifif allFound ≠ TRUE thenset i12_Visible of window "Find" to TRUErepeatset cursor to busyif the mouseClick thenset i3_Name of window "Find" to "Continue"set i8_Text of window "Find" to searchHitsset i12_Visible of window "Find" to FALSEexit repeatend iffindInXCMD searchMe,findMe,startChar,FALSEput the result into xTractput item 1 of xTract & "," after aFoundLineput item 5 of xTract into startCharif item 1 of xTract = 0 thenbeepset i3_Name of window "Find" to "Find"set i8_Text of window "Find" to searchHitsput TRUE into allFoundput findMe into lastFindMeexit repeatend ifput char 1 to 80 of line item 1 of xTract of searchMe & return after searchHitsput numHit + 1 into numHitset i7_Text of window "Find" to numHitend repeatelse beepend ifend wsFindHiton findPICTname xglobal hitPath, startChar, howFarDown, aFoundLine, lineNo, searchMeput locateF() & "data:aris.data" into fileNameopen file fileNameread from file fileName until "≈"close file fileNamerepeat with i = 1 to the number of lines in itput word 1 of line i of it into item i of xTractorend repeatput item howFarDown of aFoundLine into lineNoget line lineNo of searchMerepeat with i = 1 to the number of items in xTractorif it contains (item i of xTractor) thenput line lineNo - i + 1 to lineNo - i + 5 of searchMe into hitPathexit repeatend ifend repeatend findPICTnameon startUsingStack theStack-- make sure the stack can be 'used'if theStack is in the stacksInUse then exit startUsingStackif the number of lines in the stacksInUse = 10then stop using stack (line 1 of the stacksInUse)if there is a stack theStack thenstart using stack theStackget the resultif it is not empty thenif it is "Can't start using home." then exit startUsingStack -- ∆answer itexit to hyperCardend ifend ifend startUsingStackon stopUsingStack theStackif theStack is in the stacksInUsethen stop using stack theStackend stopUsingStackon BuildSndListglobal sndKind,thePath,sndList,theSnd,List2,lastPath,windowName,lastSnd,theDialog,numberOfSndsglobal setSound,sKind,sndListWithIconsput locateF() & "snd Files:" into thePathif sndList = empty or thePath ≠ lastPath thenput locateF() & "data:sndData" into fileNameif IsFile(filename) thenopen file filenameread from file filename until emptyclose file filenameput it into sndListelseput GetDir(thePath,"F","o=nr") into sndListrepeat with i = 1 to the number of lines of sndListput "," before line i of sndList -- Add item that normally would contain the snd Typeend repeatput ChangeStr(sndList,"[44]",",","all") into sndList -- Change "[44]'s" back into commasend ifput the number of lines of sndList into numberOfSndsif setSound = empty or thePath ≠ lastPath thenput empty into setSoundput empty into sKindput empty into sndListWithIconsrepeat with i = 2 to 101set cursor to busyset numberformat to "0.#" -- circleif (i-1) ≤ numberOfSnds thenput item 1 of line (i-1) of sndList into xif x is not in sKind thenput x into line (number of lines of sKind + 1) of sKindend iffindInXCMD sKind,x,1,FALSEput (item 1 of the result) * 1000 into sndKindput sndKind + round(((last item of line (i-1) of sndList/1024)/22)/2.5) & return after setSoundput sndKind + round(((last item of line (i-1) of sndList/1024)/22)/2.5) && item 2 to number of items of line (i-1) of sndList -1 of line (i-1) of sndList & return after sndListWithIconsend ifend repeatend ifput thePath into lastPathend ifset i1_Text of window "Sound Picker" to setSoundget"i5_Text:" & (line 1 of sKind) & return &¬"i7_Text:" & (line 2 of sKind) & return &¬"i9_Text:" & (line 3 of sKind) & return &¬"i11_Text:" & (line 4 of sKind) & return &¬"i13_Text:" & (line 5 of sKind)set the properties of window "Sound Picker" to itend BuildSndListon playTheSoundglobal lastSnd,theSnd,myRefNum,sndKind,sndLength,paletteName,numberOfSnds,pList,start_ticksput locateF() & "Snd Files:" & theSnd into sndfileNameput "" into lastSndset i21_Name of window "Sound Picker" to "Stop"if paletteName contains "Sm" thenset i6_Name of window paletteName to soundelse set i7_Name of window paletteName to soundset i22_text of window "Sound Picker" to "‹Click the mouse to stop"put char 1 of i1_SelectionText of window "Sound Picker" & "000" into sndKindset cursor to 4put "" into start_ticksplayItAgainSoundm sndfileName,theSndset i21_Name of window "Sound Picker" to "Play"set i22_text of window "Sound Picker" to "€Double-Click to play sound"set i19_Text of window "Sound Picker" to sndLengthset numberformat to "0.#"if i1_Style of window "Sound Picker" = ListWithIcons thenset i1_textOfSelection of window "Sound Picker" to sndKind + round(sndLength/2.5) && theSndelseset i1_textOfSelection of window "Sound Picker" to sndKind + round(sndLength/2.5)end ifif paletteName contains "Sm" thenset i6_Name of window paletteName to nosoundelse set i7_Name of window paletteName to nosoundend playTheSoundon wsAnimateglobal start_ticks,theSnd,sndKind,sndLength,ifSlideShow,stopShowif ifSlideShow thenif the mouseClick thenput TRUE into stopShowexit to hypercardexit wsAnimateend ifelse if there is a window "Sound Picker" thenif start_ticks="" then put the ticks into start_ticksif ((the ticks - start_ticks)/60) ≤ sndLength thenput round(((the ticks - start_ticks)/60)/2.5 + sndKind) into iset numberformat to "0.#"get i1_SelectionText of window "Sound Picker"if i1_Style of window "Sound Picker" = ListOfIcons thenif it ≠ i thenset i1_textofselection of window "Sound Picker" to iend ifelseif word 1 of it ≠ i thenset i1_textofselection of window "Sound Picker" to i && theSndend ifend ifset i19_text of window "Sound Picker" to ((the ticks - start_ticks)/60)elseput "done" into the soundexit wsAnimateend ifend ifend wsAnimateon showPrefsglobal pSize,ifBackground,ifSound,ifInfo,FullStyle,SmallStyle,ThumbStyle,defaultSize,pStyle,ifXLglobal bgColor,theDataif item 3 of screenInfo(Main) > 640 then put FALSE into hideBIGSCREENelse put TRUE into hideBIGSCREENif pSize = " (small)" thenput "Small" into defaultSizeput SmallStyle into pStyleelse if pSize = " Thumbnails" thenput "Thumbnails" into defaultSizeput ThumbStyle into pStyleelseput "Full Size" into defaultSizeput FullStyle into pStyleend ifget "i1_Hilite:" & ifBackground & return &¬"i2_Hilite:" & ifSound & return &¬"i3_Hilite:" & ifInfo & return &¬"i5_SelectionText:" & defaultSize & return &¬"i7_SelectionText:" & FullStyle & return &¬"i9_SelectionText:" & SmallStyle & return &¬"i11_SelectionText:" & ThumbStyle & return &¬"i19_Text:," & bgColor & return &¬"i19_WhiteColor:" & bgColor & return &¬"i23_Disabled:" & hideBIGSCREEN & return &¬"i23_Hilite:" & ifXLput windowScript("Preferences" & return & it) into prefDataif prefData ≠ empty thenput line 1 of prefData into ifBackgroundput line 2 of prefData into ifSoundput line 3 of prefData into ifInfoput line 5 of prefData into defaultSizeput line 7 of prefData into FullStyleput line 9 of prefData into SmallStyleput line 11 of prefData into ThumbStyleput line 19 of prefData into bgColorput line 23 of prefData into ifXLif line 19 of prefData = "" then put 256 into bgColorif defaultSize = "Small" thenput " (small)" into pSizeput SmallStyle into pStyleelse if defaultSize = "Thumbnails" thenput " Thumbnails" into pSizeput ThumbStyle into pStyleelseput empty into pSizeput FullStyle into pStyleend ifput "Background=" & ifBackground & "≈" into line 1 of theDataput "Sound=" & ifSound & "≈" into line 2 of theDataput "Info=" & ifInfo & "≈" into line 3 of theDataput "Size=" & pSize & "≈" into line 4 of theDataput "Style=" & pStyle & "≈" into line 5 of theDataput "FullStyle=" & FullStyle & "≈" into line 6 of theDataput "SmallStyle=" & SmallStyle & "≈" into line 7 of theDataput "ThumbStyle=" & ThumbStyle & "≈" into line 8 of theDataput "bgColor=" & bgColor & "≈" into line 9 of theDataput "ifXL=" & ifXL & "≈" into line 10 of theDatawritePrefs-- set visible of cd window to ifBackgroundif ifBackGround = TRUE thenif there is a window "Blackout" then show window "Blackout"else get windowScript("Blackout")send "Sendtoback" to window "Blackout"wsSet "Blackout",0,WhiteColor,bgColorelseif there is a window "Blackout" then close window "Blackout"end ifshowPictureend ifend showPrefs</script>